import bb.cascades 1.0

NavigationPane {
    id: addNavigation
    Page {
        actions: [
            // define the actions for first tab here
            ActionItem {
                title: qsTr("Rotate")
                onTriggered: {
                    //                imgTab1.rotationZ = imgTab1.rotationZ + 90;
                }
            },
            ActionItem {
                title: qsTr("Break")
                onTriggered: {
                    //                imgTab1.imageSource = "asset:///images/picture1br.png";
                }
            }
        ]
        
        Container {
            Container {
                horizontalAlignment: HorizontalAlignment.Center
                Label {
                    text: "aaaaaaaaaa"
                }
            }
            
            Divider {
            }
            
            Container {
                horizontalAlignment: HorizontalAlignment.Center
                
                ImageButton {
                    defaultImageSource: "asset:///images/picture1.png"
                }
                Label {
                    horizontalAlignment: HorizontalAlignment.Center
                    text: "bbbbbbbbb"
                }
            }
            
            Divider {
                verticalAlignment: VerticalAlignment.Center
            }
            
            Container {
                horizontalAlignment: HorizontalAlignment.Center
                ImageButton {
                    defaultImageSource: "asset:///images/picture1.png"
                }
                Label {
                    horizontalAlignment: HorizontalAlignment.Center
                    text: "bbbbbbbbb"
                }
            }
            
            Button {
                text: "next"
                horizontalAlignment: HorizontalAlignment.Center
                
                onClicked: {
                    // show detail page when the button is clicked
                    var adddetailpage = addNavigation.getAddDetailPage();
                    console.debug("pushing detail " + adddetailpage)
                    addNavigation.push(adddetailpage);
                }
            
            }
        }
    
    
    }
    attachedObjects: [
        ComponentDefinition {
            id: addDetailDefinition
            source: "AddDetail.qml"
        }
    ]
    property Page addDetailPage
    function getAddDetailPage() {
        if (! addDetailPage) {
            addDetailPage = addDetailDefinition.createObject();
        }
        return addDetailPage;
    }
}
